import deepcopy from 'deepcopy'
export const baseValidate = {
  name: [{
    required: true,
    message: '分类名称不能为空',
    trigger: 'blur'
  },
  {
    type: 'string',
    min: 2,
    max: 50,
    message: '分类名称长度必须是2~50字符',
    trigger: 'blur'
  }],
  sort: [
    {
      type: 'number',
      max: 100,
      min: 0,
      message: '排序只能是0~100的整数',
      trigger: 'change'
    }
  ],
  level: [{
    type: 'number',
    max: 100,
    min: 0,
    message: '分类级别只能是0~100的整数',
    trigger: 'change'
  }]
}

export const addValidate = deepcopy(baseValidate)

export const editValidate = deepcopy(baseValidate)
